Manage profile
3 minute read
Advanced
Glific introduces multiple profiles, enabling efficient and personalized engagement with beneficiaries where a single phone number is used by multiple end users. In this way, by segregating a single contact at the profile level, NGOs can significantly increase the impact of their work.
Sample Use Case
To achieve the multiple profiles feature, We added a new node called Manage profile
with two choices at the flow level.
Create Profile
creates a new profile for contact.Switch Profile
allows you to change between profiles.
Create Profile
- Here's a sample flow with minimal configuration for creating a profile in Glific
- The initial node is the
Send Message
node, where the contact is prompted to provide their details such as name, role, or age to create the profile
- The second node is the
Wait for Response
node with the result namedemo_username
. The response from the contact will be saved in this result and can be referenced as@results.demo_username
.
-
The third node is the
Interactive Message
, the user is presented with options to select their role, in the below sample case we have given the option to choose the role as student or teacher. -
Using the user information provided, the
Manage profile
node will create a user profile, and the relevant data will be saved in the result variables, accessible as@results.demo_username
and@results.demo_role
for future reference.
- Finally, the
Update Contact
node will update the contact with the relevant contact variables.
- Upon profile creation, a message will be sent using the
Send Message
node, notifying the contact that "your user profile has been successfully created!"
Switch Profile
- Here's a sample flow with minimal configuration for the switch Profile profile in Glific
- The first node is the
Send Message
facilitates users in switching between different profiles by using the@contact.list_profiles
to display all available user profiles.
Here's how the contacts will look like:
- The second node is the
Wait for Response
node where each profile will be numbered based on when they were created, first, second, third, and so on. The response from the contact will be saved in the result and can be referenced as@results.profile_index
- We'll use the
Manage Profile
node to switch the user profile based on their response, using the@results.profile_index
.
- Once the switch is completed successfully, a message will be sent to the contacts using the
Send Message
node, notifying them that their profile has been successfully switched to@contact.fields.demo_username
.
Tags
Multiple profiles, create profile, switch profile, manage profile, update contact, Interactive Message